<meta charset="utf-8">
<style>
    #d1{
        background: url(1.jpg) no-repeat;
        width:250px;
        height: 250px;
        border-radius: 50%;
    }
    .box{
        width:250px;
        margin:0 auto;
    }
    .btn{
        text-align: center;
    }
</style>
<div class="box">
    <div id="d1"></div>
    <br/>
    <div class="btn"><input type="button" value="抽奖" id="btn"/></div>
</div>
<script>
    var imgs = ["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg"];
    var timer;
    btn.onclick = function(){
        if(btn.value=="停"){
            clearInterval(timer);
            btn.value="抽奖";
        }else{
            timer = setInterval(show,100);
            btn.value="停";
        }
    }
    function show(){
        d1.style.background = "url("+imgs[Math.floor(Math.random()*imgs.length)]+")";
    }
</script>